<template>
  <form id="form1">
    <div id="container">
      <div class="content">
        <div class="tit">
          <a>首页</a>&gt;
          <a>会员信息</a>&gt;
          <a>会员展示</a>
        </div>
        <div class="news" style="width: 810px;margin-left: auto;margin-right: auto;">
          <div class="news_l">
            <div class="unit_title">
              <h2>基本信息</h2>
            </div>
            <div id="unitInfo_1">
              <table cellspacing="1" cellpadding="1" border="0" width="100%" class="tb_unit">
                <tbody>
                  <tr>
                    <td class="tdtit" width="70px">企业名称</td>
                    <td class="tdbox">
                      <b>{{detail.name}}</b>
                    </td>
                  </tr>
                  <tr>
                    <td class="tdtit">会员类型</td>
                    <td class="tdbox">{{detail.type.split(":")[1]}}</td>
                  </tr>
                  <tr>
                    <td class="tdtit">公司资质</td>
                    <td class="tdbox">
                      {{detail.cert}}
                    </td>
                  </tr>
                  <tr>
                    <td class="tdtit">公司简介</td>
                    <td class="tdbox">
                      {{detail.info}}
                    </td>
                  </tr>
                  <tr>
                    <td class="tdtit">联 系 人</td>
                    <td class="tdbox">{{detail.contactName}}</td>
                  </tr>
                  <tr>
                    <td class="tdtit">联系电话</td>
                    <td class="tdbox">{{detail.phone}}</td>
                  </tr>
                  <tr>
                    <td class="tdtit">详细地址</td>
                    <td class="tdbox">{{detail.address}}</td>
                  </tr>
                  <tr>
                    <td class="tdtit">E_mail</td>
                    <td class="tdbox">{{detail.email}}</td>
                  </tr>
                  <tr>
                    <td class="tdtit">公司网站</td>
                    <td class="tdbox">
                      {{detail.website}}
                    </td>
                  </tr>
                </tbody>
              </table>
            </div>
            <div class="unit_title">
              <h2>公司动态</h2>
            </div>
            <div id="unitNewsList">
              <ul class="news_list">
                <li v-for="(item,index) in list">
                  <span class="num">{{index + 1}}</span>
                  <span class="name">
                    <a :href="'/newsview?type=1&id=' + item.id"
                      :title="item.title" target="_blank">{{item.title}}</a>
                  </span>
                  <span class="time">{{item.createdTime.substring(0,10)}}</span>
                </li>
              </ul>
              <div class="divPage">
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </form>
</template>

<script>
import Data from '@/api/data'

export default {
  name: 'Index',
  props:{
    layout: String
  },
  data() {
    return {
      detail: {},
      list: [],
    }
  },
  watch: {
    month: {
    }

  },
  computed: {
  },
  async created() {
    var query = this.$route.query;
    var res = await Data.get("/branch/" + query.id);
    if(res) {
      this.detail = res
      var res2 = await Data.get("/article", {source:query.id});
      if(res2) {
        this.list = res2.list
      }
    }
  },
  methods: {
  }
}
</script>

<style lang="scss" scoped>
@import "~@/styles/new_files/bootstrap.min.css";
@import "~@/styles/new_files/iconfont.css";
@import "~@/styles/new_files/comm.css";
@import "~@/styles/new_files/info.css";
</style>
